#!/usr/bin/python
#-*- coding:utf-8 -*
#django添加数据库用户密码
import sys
import os
os.environ.setdefault( "DJANGO_SETTINGS_MODULE", "mysite.settings" )
from accounts.models import User
from optparse import OptionParser
from django.core.paginator import Paginator,EmptyPage
from django.shortcuts import render_to_response
from django.http import HttpResponse, HttpResponseRedirect


###编码转移,可以输出中文####
reload(sys)
sys.setdefaultencoding('utf-8')



contact_list = User.objects.all()
for i in contact_list:
    if i.user_type == 0:
        print "%s 管理员" % i.name
    else:
        print "%s 普通" % i.name
